<%@page import="org.apache.commons.dbutils.handlers.BeanListHandler"%>
<%@page import="cn.cjyll.C3P0DataSoure.JDBCUtilsC3P0"%>
<%@page import="cn.cjyll.bean.shoplog"%>
<%@page import="org.apache.commons.dbutils.QueryRunner"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<jsp:include page="head.jsp" />
<body class="page-body  page-fade">
<jsp:include page="nav.jsp" />
<div class="row">
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-red">
                    <div class="icon"><i class="entypo-users"></i></div>
                    <div class="num" >${requestScope.rs }</div>
        
                    <h3>已注册用户数量</h3>
                 <p>${requestScope.status1 }个正常账号</p>
                </div>
        
            </div>
                
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-aqua">
                    <div class="icon"><i class="entypo-mail"></i></div>
                    <div class="num" >${requestScope.status2 }</div>
        
                    <h3>已失效用户数量</h3>
                    <p>${requestScope.status2 }个非正常账号</p>
                </div>
        
            </div>
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-green">
                    <div class="icon"><i class="entypo-chart-bar"></i></div>
                    <div class="num" >${requestScope.shop }</div>
        
                    <h3>已添加商品数量</h3>
                    <p>1个商品未使用</p>
                </div>
        
            </div>

        
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-blue">
                    <div class="icon"><i class="entypo-rss"></i></div>
                    <div class="num"><c:out value="${applicationScope.count }">0</c:out> </div>
        
                    <h3>在线人数数量</h3>
                    <p>当前实时在线人数</p>
                </div>
        
            </div>
        </div>
        
        <br />
     <div class="row">
                <div class="col-sm-12">
                    
                  <div class="panel panel-default">
                    <div class="panel-heading">
                      <h3 class="panel-title">当前平台监控日志</h3>
             
                    </div>
                    <div class="panel-body">
                    <%
                    QueryRunner qr = new QueryRunner(JDBCUtilsC3P0.getDataSoure());
                    String sql = "select * from buylog";
                    List<shoplog> buylist = qr.query( sql, new BeanListHandler<shoplog>(shoplog.class));
                    request.setAttribute("buylist", buylist);    
                    %>
                     <div class="table-responsive">
                      
                     <table cellspacing="0" class="table table-small-font table-bordered table-striped">
                    <c:forEach items="${requestScope.buylist }" var="i">
                     <tr>
                        <td>用户 ${i.username } 在 ${i.time } 提交了订单，订单编号为：${i.bh }，订单总价为：${i.price }元，订单状态为：${i.status }。
                        <c:if test="${i.status=='已支付'}">请管理员尽快处理！</c:if></td>
                     </tr>
                     </c:forEach>
                     </table>
                     </div>
                      
                    </div>
                  
                  </div>
                    
                </div>

            </div>

        
 
<jsp:include page="copy.jsp" />


